﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;

namespace Kopytko
{
    public class Commands
    {
        public static RoutedUICommand LogInCommand { get; private set; }
        public static RoutedUICommand StayOfflineCommand { get; private set; }

        public static RoutedUICommand RegisterCommand { get; private set; }

        static Commands()
        {
            LogInCommand = new RoutedUICommand();
            StayOfflineCommand = new RoutedUICommand();
            RegisterCommand = new RoutedUICommand();
        }
    }

    public abstract class CommandParameter : Freezable
    {
    }

    public class LogInCommandParameter : CommandParameter
    {


        public string Login
        {
            get { return (string)GetValue(LoginProperty); }
            set { SetValue(LoginProperty, value); }
        }

        public static readonly DependencyProperty LoginProperty =
            DependencyProperty.Register("Login", typeof(string), typeof(LogInCommandParameter), new UIPropertyMetadata(null));



        public string Pass
        {
            get { return (string)GetValue(PassProperty); }
            set { SetValue(PassProperty, value); }
        }

        // Using a DependencyProperty as the backing store for Pass.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty PassProperty =
            DependencyProperty.Register("Pass", typeof(string), typeof(LogInCommandParameter), new UIPropertyMetadata(null));



        protected override Freezable CreateInstanceCore()
        {
            return new LogInCommandParameter();
        }
    }
}
